﻿using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using SmartCity.Shared;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;

namespace MetroManagement
{
    /// <summary>
    /// 城市控制器
    /// </summary>
    [RemoteService]
    [Area("metroManagement")]
    [Route("api/metroManagement/cities")]
    public class CityController : AbpController, ICityAppService
    {
        private readonly ICityAppService _cityAppService;

        public CityController(
            ICityAppService cityAppService)
        {
            _cityAppService = cityAppService;
        }

        // 获取
        [HttpGet]
        [Route("")]
        public Task<ResultResponse<CityDto>> GetAsync()
        {
            return _cityAppService.GetAsync();
        }
    }
}